#if !defined(AFX_PARTSTRINGVIEW_H__DE581B04_6FDC_46A3_9B9F_994096CCA86F__INCLUDED_)
#define AFX_PARTSTRINGVIEW_H__DE581B04_6FDC_46A3_9B9F_994096CCA86F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PartStringView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CPartStringView form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

#include "PHSShareRes.h"
#include "PartString.h"
#include "FormViewEx.h"

#define WM_UPDATEPARENTWND WM_USER + 333

enum{
	DEL,
		ADD};

class CPartStringView : public CFormViewEx
{
protected:
	CPartStringView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CPartStringView)

public:
	void LinkToObject(PartString* pString){
		m_pObject = pString;
	}
// Form Data
public:
	//{{AFX_DATA(CPartStringView)
	enum { IDD = IDD_PARTSTRING };
	CComboBox	m_FirstPartStyleCombo;
	CListBox	m_PartList;
	CListBox	m_EnablePartList;
	//}}AFX_DATA

private:
	void AddPartToList(Part* pPart);
	void AddStringToList();

private:
	void GetFirstPart();
	void UpdateFirstPartStyleWindowState();
	void InitFirstPartStyleCombo();
	PartString* m_pObject;
	BOOL m_bIsFirstVisible;
// Attributes
public:

// Operations
public:
	void GetAfterPart(Part* pPart, Part* pPrev = NULL);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPartStringView)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CPartStringView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CPartStringView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnDelButton();
	afx_msg void OnAddButton();
	afx_msg void OnSelchangeFirstpartstyleCombo();
	afx_msg void OnSelchangePartList();
	afx_msg void OnSelchangeEnablepartList();
	afx_msg void OnDblclkEnablepartList();
	afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PARTSTRINGVIEW_H__DE581B04_6FDC_46A3_9B9F_994096CCA86F__INCLUDED_)
